package com.hhkj.admin.sale.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BizBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

/**
 *
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "s_sale_withdrawal")
@Data
public class SaleWithdrawal extends BizBaseEntity {
    /**
     * 提现单号
     */
    @TableField(value = "num")
    @Excel(name = "提现单号", orderNum = "0", width = 20)
    private String num;

    /**
     * 提现金额
     */
    @TableField(value = "price")
    @Excel(name = "提现金额", orderNum = "4", width = 20, type = 10, numFormat = "#,##0.00")
    private BigDecimal price;

    /**
     * 累计提现总额
     */
    @TableField(value = "accumulate_price")
    @Excel(name = "累计提现金额", orderNum = "10", width = 20, type = 10, numFormat = "#,##0.00")
    private BigDecimal accumulatePrice;

    /**
     * 阿里转账流水号
     */
    @TableField(value = "alipay_num")
    @Excel(name = "提现流水号", orderNum = "1", width = 30)
    private String alipayNum;

    /**
     * 到账状态：0-未到账 1-已到账
     */
    @TableField(value = "complete_flag")
    private Integer completeFlag;

    /**
     * 提现状态："normal"-正常 "exception"-异常
     */
    @TableField(value = "status_code")
    private String statusCode;

    /**
     * 提交时间
     */
    @TableField(value = "submit_time")
    @Excel(name = "提现时间", orderNum = "3", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date submitTime;

    /**
     * 到账日期
     */
    @TableField(value = "complete_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date completeTime;

    /**
     * 备注
     */
    @TableField(value = "remark")
    @Excel(name = "备注", orderNum = "9", width = 20)
    private String remark;

    /**
     * 异常说明
     */
    @TableField(value = "fail_description")
    @Excel(name = "异常说明", orderNum = "8", width = 20)
    private String failDescription;

    /**
     * 提现账号，关联s_sale_withdrawal_account
     */
    @TableField(value = "account_id")
    private Long accountId;

    /**
     * 固化，对应s_sale_withdrawal_account
     */
    @TableField(value = "account")
    private String account;

    /**
     * 固化，对应s_sale_withdrawal_account
     */
    @TableField(value = "account_name")
    private String accountName;

    /**
     * 固化，对应s_sale_withdrawal_account
     */
    @TableField(value = "account_type_code")
    private String accountTypeCode;

    /**
     * 所属商家，关联s_sale
     */
    @TableField(value = "sale_id")
    private Long saleId;

    /**
     * 固化，关联s_sale
     */
    @TableField(value = "sale_num")
    private String saleNum;

    /**
     * 固化，对应s_sale
     */
    @TableField(value = "sale_name")
    private String saleName;

    /**
     * 所属销售，关联s_sale
     */
    @TableField(value = "sale_root_id")
    private Long saleRootId;

    /**
     * 固化，对应s_sale
     */
    @TableField(value = "sale_root_num")
    private String saleRootNum;

    /**
     * 固化，对应s_sale
     */
    @TableField(value = "sale_root_name")
    private String saleRootName;
}